/**
 * Created by yqj on 2017/1/19.
 */
import Vue from 'vue'
import Vuex from 'vuex'
import * as modules from './store-modules'
import { getters } from './getters'
import { actions } from './actions.js'
import { mutations } from './mutations.js'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    currentUserRoleKey: '',       // 当前登录用户的角色key
    currentUserRoleValue: '',       // 当前登录用户的角色value
    currentUserFullName: '',       // 当前登录用户的全名
    user_role: null,
    activeType: null,
    itemsPerPage: 10,
    currentPage: 1,
    totalSize: 0,
    items: {},
    users: {},
    lists: {
      userManagement: [],
      contentManagement: [],
      labelManagement: [],
      classifyManagement: [],
      checkBaseInfo: [],
      checkContent: [],
      enteringContent: [],
      teacherEntering: [],
      checkAnalysis: [],
      statistics: []
    },
    dictionary: {
      bookType: [],
      brand: [],
      grade: [],
      province: [],
      selfContentType: [],
      series: [],
      subject: [],
      topicType: [],
      version: [],
      volume: []
    }
  },
  actions,
  mutations,
  getters,
  modules

})

export default store
